package com.ambimmort.shj.action.dpi.users.group.adsl;

import com.ambimmort.shj.service.dpi.users.group.AdslService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2015/7/30.
 */
@Controller("/action/dpium/group/adsl/create.do")
public class Create {
    @Autowired
    private AdslService adslService;

    @RequestMapping("/action/dpium/group/adsl/create.do")
    @ResponseBody
    public String action_DpiUsersGroupIpUserCreate(HttpServletRequest request, @RequestParam("json") String json){

        try {
            adslService.adslCreate(json);
            return "{\"result\":\"true\"}";
        } catch (Throwable throwable) {
            throwable.printStackTrace();
            return "{\"result\":\"false\"}";
        }
    }
}
